package com.peak.spring.boot.api.entity;

import java.util.Date;

import javax.persistence.MappedSuperclass;

import com.peak.spring.boot.api.constant.Constants;
import com.peak.spring.boot.api.repository.FilterParam;
import com.peak.spring.boot.api.repository.FilterParam.Operator;

import lombok.Getter;
import lombok.Setter;

@MappedSuperclass
@Getter
@Setter
public class LogicalDeleteEntity extends DefaultStategyEntity {

	private static final long serialVersionUID = Constants.SERIAL_VERSION;

	/** 删除标志 */
	protected Boolean delFlag = Boolean.FALSE;

	/** 删除时间 */
	protected Date delDateTime;

	/** 删除用户 */
	protected Integer delUserId;
	
	public static FilterParam addFilterDeleted() {
		return new FilterParam("delFlag", Operator.EQ, false);
	}
}
